package net.xdclass.strategy;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class ShardingDBConfig {
	private static final List <String> DBList = new ArrayList<String>();
	static {
		DBList.add("0");
		DBList.add("1");
		DBList.add("a");
	}

	public static String getDBPrefix(String url){
		int index = Math.abs(url.hashCode()) % DBList.size();
		return  DBList.get(index);
	}
	}
